#include <iostream>
using namespace std;
#include"process.h"

void DownLoad(double _size,double _speed)
{
    double _cur = 0.0;
    while(_cur <= _size)
    {
        updateprocessbar(_size,_cur);
        if(_cur == _size)
            break;
        usleep(20000);
        _cur += _speed;
    }
    printf("\n");
}


int main()
{
    DownLoad(1024.0,2.0);
    DownLoad(1024.0,0.0);
    return 0;
}
